import {
	GET,
	POST,
	path
} from "./config";
import {
	requestT
} from "./core1";
 

const network = {
	login(params) {
		return requestT(POST, path.login, { bodyParams: params });
	},
	setNewPlan(params) {
		return requestT(POST, path.setNewPlan, { queryParams: params });
	},
	getPlanList(params) {
		return requestT(GET, path.getPlanList, params);
	},
	weighFeedback(params) {
		return requestT(GET, path.weighFeedback, params);
	},
	setWeighFeed(params) {
		return requestT(POST, path.setWeighFeed, { queryParams: params });
	},
	getHisList(params) {
		return requestT(GET, path.getHisList, params);
	},
	setHis(params) {
		return requestT(POST, path.setHis, { queryParams: params });
	},
	getUserInfo() {
		return requestT(GET, path.getUserInfo);
	},
	getPointList(params) {
		return requestT(GET, path.getPointList,params);
	},
	getDeductWeight(params) {
		return requestT(GET, path.getDeductWeight, params);
	},
	setRule(params) {
		return requestT(POST, path.setRule, { queryParams: params });
	},
	getPrintId(params) {
		return requestT(GET, path.getPrintId, params);
	},
	getCargoNameList(params) {
		return requestT(GET, path.getCargoNameList, params);
	},
	getCountNum(params) {
		return requestT(GET, path.getCountNum, params);
	},
	deletePlan(params) {
		return requestT(POST, path.deletePlan, { queryParams: params });
	},
	setPassWord(params) {
		return requestT(POST, path.setPassWord, { queryParams: params });
	},
	getCompanyList(params) {
		return requestT(GET, path.getCompanyList, params);
	},
	deleteCompany(params) {
		return requestT(POST, path.deleteCompany, { queryParams: params });
	},
	setCompany(params) {
		return requestT(POST, path.setCompany, { queryParams: params });
	},
	getCompanySelect(params) {
		return requestT(GET, path.getCompanySelect, params);
	},

	getFieldAlarmSettingPageList(params){
		return requestT(GET, path.getFieldAlarmSettingPageList, params);
	},

	
	setAllList(params) {
		return requestT(POST, path.setAllList, params);
	},
	rollbackWeighing(params) {
	  // 正确传递参数结构，让post方法内部处理URL拼接
	  return requestT(POST, path.rollbackWeighing, {
	    queryParams: params  // 将参数作为查询参数传递
	    // 如果需要传递body参数，可以添加 bodyParams: {}
	  });
	}


};

export default network;